function oUF.handlers:PLAYER_REGEN_DISABLED()
	if UnitAffectingCombat"player" then
		self.Combat:Show()
	else
		self.Combat:Hide()
	end
end

oUF.handlers.PLAYER_REGEN_ENABLED = oUF.handlers.PLAYER_REGEN_DISABLED

oUF.subTypes["Combat"] = function (self, unit)
	if unit == "player" then
		self:RegisterEvent"PLAYER_REGEN_ENABLED"
		self:RegisterEvent"PLAYER_REGEN_DISABLED"
		self:PLAYER_REGEN_ENABLED()
	end
end

function oUF.handlers:PLAYER_UPDATE_RESTING()
	if IsResting() then
		self.Resting:Show()
	else
		self.Resting:Hide()
	end
end

oUF.subTypes["Resting"] = function (self, unit)
	if unit == "player" then
		self:RegisterEvent"PLAYER_UPDATE_RESTING"
		self:PLAYER_UPDATE_RESTING()
	end
end

oUF.updateTypes["Combat"] = "PLAYER_REGEN_ENABLED"
oUF.updateTypes["Resting"] = "PLAYER_UPDATE_RESTING"
